package file;


import java.util.ArrayList;
import java.util.Collection;
import java.util.function.Consumer;

public class Test4 {
    public static void main(String[] args) {
        Collection<String> c = new ArrayList<>();
        c.add("one");
        c.add("two");
        c.add("three");
        c.add("four");
        c.add("five");
      /*  Consumer consumer = new Consumer() {
            @Override
            public void accept(Object o) {
                System.out.println(o);
            }
        };
        c.forEach(consumer);*/
        c.forEach(System.out::println);
    }
}
